package com.jiantong.lawEnforcing.util;

import com.jiantong.lawEnforcing.model.CasesBasic;
import com.jiantong.lawEnforcing.model.PartiesInformation;

/**
 * 执法办案工具类
 * Created by mz03 on 2017/8/31.
 */
public class LawUtil {

    public static Boolean isPass(PartiesInformation partiesInformation,Integer parties_type,String name){
        //赛选parties_type
        if (parties_type!=null && !partiesInformation.getParties_type().equals(parties_type)){
            return false;
        }
        //赛选name
        if (name != null){
            if (partiesInformation.getOrganization_name()!=null && !partiesInformation.getOrganization_name().equals(name)){
                return false;
            }
            if (partiesInformation.getPersonage_name()!=null && !partiesInformation.getPersonage_name().equals(name)){
                return false;
            }
        }
        return true;
    }
    public static Boolean isPass(CasesBasic casesBasic, String cause_action, Integer cases_source){
        if(!casesBasic.getCause_action().equals(cause_action )||!casesBasic.getCases_source().equals(cases_source)){
            return false;
        }
        return true;
    }
}
